package com.lagou.edu.controller;

import com.lagou.edu.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lyj
 * @Title: ResumeController
 * @ProjectName lagou-parent
 * @Description: TODO
 * @date 2020/12/27 10:55
 */
@RestController
@RequestMapping("/resume")
public class ResumeController {
    @Autowired
    private ResumeService resumeService;
    @Value("${server.port}")
    private Integer port;
    //"/resume/openstate/1545132"
//    @GetMapping("/openstate/{userId}")
//    public Integer findDefaultResumeState(@PathVariable Long userId) {
//        return resumeService.findDefaultResumeByUserId(userId).getIsOpenResume();
//    }
    @GetMapping("/openstate/{userId}")
    public Integer findDefaultResumeState(@PathVariable Long userId) {
        return port;
    }
}
